//
//  headView.m
//  日历学习
//
//  Created by fly on 16/8/11.
//  Copyright © 2016年 fly. All rights reserved.
//

#import "HeadView.h"
#define kWidth [UIScreen mainScreen].bounds.size.width
#define kHeight [UIScreen mainScreen].bounds.size.height

@implementation HeadView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        NSArray *array = @[@"日",@"一",@"二",@"三",@"四",@"五",@"六"];
        for (int i = 0; i < 7; i++)
        {
            UILabel *dateLable = [[UILabel alloc]initWithFrame:CGRectMake(i * (kWidth - 24)/7, 0, (kWidth - 24)/7, 40)];
            dateLable.text = array[i];
            dateLable.backgroundColor = [UIColor clearColor];
            dateLable.textAlignment = NSTextAlignmentCenter;
            [self addSubview:dateLable];
        }

    }
    return self;
}
@end
